module test_fpmultiplier;
logic [31:0] product;
logic        ready;
logic [31:0] a;
logic clock, nreset;
shortreal reala, realproduct;

fpmultiplier_behav a1(.*);

initial begin
    $fsdbDumpfile("test_fpmultiplier.fsdb"); 
    $fsdbDumpvars(0, test_fpmultiplier);
    $fsdbDumpflush;
end

initial begin
    nreset = '1;
    clock = '0;
    #5ns nreset = '1;
    #5ns nreset = '0;
    #5ns nreset = '1;
    forever begin
       #5ns clock = ~clock; 
    end
end

// behavior samulatrion
initial begin
    @(posedge clock);
    @(posedge ready);
    @(posedge clock);
    reala = 1.0;
    a = $shortrealtobits(reala);
    @(posedge clock);
    reala = -2.0;
    a = $shortrealtobits(reala);
    @(posedge ready);
    realproduct = $bitstoshortreal(product);
    $display("%f\n", realproduct);
    $stop;
end

endmodule